package reposibility.chain;

/**
 * @author ZLL
 * @date create in 2018/05/10
 */
public class President extends Approver {
    public President(String name) {
        super(name);
    }

    /**
     * 具体请求处理方法
     */

    @Override
    public void handleRequest(PurchaseRequest request) {
        if (request.getPrice() < PriceEnum._5w.getPrice()) {
            System.out.println("董事长" + this.name + "审批采购单：" + request.getId() + "，金额：" + request.getPrice() + "元，采购目的：" + request.getDesc() + "。");
        } else {
            this.successor.handleRequest(request);
        }
    }
}
